Searched hist:"32 e4e6d5cbb0c0e427391635991fe65e17797af8" (Results 1 – 1 of 1) sorted by relevance
/linux/mm/ |
H A D | mmap.c | diff 32e4e6d5cbb0c0e427391635991fe65e17797af8 Tue Jul 11 00:49:54 CEST 2017 Oleg Nesterov <oleg@redhat.com> mm/mmap.c: expand_downwards: don't require the gap if !vm_prev
expand_stack(vma) fails if address < stack_guard_gap even if there is no vma->vm_prev. I don't think this makes sense, and we didn't do this before the recent commit 1be7107fbe18 ("mm: larger stack guard gap, between vmas").
We do not need a gap in this case, any address is fine as long as security_mmap_addr() doesn't object.
This also simplifies the code, we know that address >= prev->vm_end and thus underflow is not possible.
Link: http://lkml.kernel.org/r/20170628175258.GA24881@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Hugh Dickins <hughd@google.com> Cc: Larry Woodman <lwoodman@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|